using System;
using System.Collections.Generic;
using System.Text;

namespace HenIT.GACCompare
{
    public class GACEntry
    {
        #region Properties
        private string assemblyName;
        public string AssemblyName
        {
            get { return assemblyName; }
            set { assemblyName = value; }
        }

        private string[] assemblyPath;
        public string[] AssemblyPath
        {
            get { return assemblyPath; }
            set { assemblyPath = value; }
        }

        private Version assemblyVersion;
        public Version AssemblyVersion
        {
            get { return assemblyVersion; }
            set { assemblyVersion = value; }
        }

        private string publicKeyToken;
        public string PublicKeyToken
        {
            get { return publicKeyToken; }
            set { publicKeyToken = value; }
        }

        private long fileSize;
        public long FileSize
        {
            get { return fileSize; }
            set { fileSize = value; }
        }

        private string culture;
        public string Culture
        {
            get { return culture; }
            set { culture = value; }
        } 
        #endregion
        
        public override string ToString()
        {
            return assemblyName + " (" + assemblyVersion.ToString() + " ," + culture + ", " + publicKeyToken + ")";//+ ", " + assemblyPath
        }

        public bool Equals(GACEntry compareTo)
        {
            return (this.AssemblyName == compareTo.assemblyName) && 
                    (this.assemblyVersion.Equals(compareTo.assemblyVersion)) &&
                    (this.culture == compareTo.culture) && 
                    (this.publicKeyToken == compareTo.publicKeyToken) && 
                    (this.fileSize == compareTo.fileSize);
        }
    }
}
